package com.mgs.tagger.model
{
	import com.mgs.tagger.appdata.dto.TagDTO;
	
	import flash.events.Event;
	
	import mx.collections.ArrayCollection;
	import mx.collections.ArrayList;
	import mx.collections.ICollectionView;
	import mx.collections.IViewCursor;
	import mx.collections.Sort;
	
	public class TagUI
	{
		[Bindable]
		public var tag:TagDTO;
		
		[Bindable]
		public var children:ArrayCollection;
		
		public var parent:TagUI;
		
		public function TagUI(tag:TagDTO)
		{
			this.tag = tag;
			children = new ArrayCollection();
			for each(var cTag:TagDTO in tag.children){
				var child:TagUI = new TagUI(cTag);
				child.parent = this;
				children.addItem(child);
			}
		}
		
	}
}